home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
lsrches.zip
/
LASER.DOC
next >
Wrap
Text File
|
1988-09-29
|
16KB
|
382 lines
Laser Chess
Mike Duppong
PC version by Tim Midkiff
"Laser Chess" won First Prize in our $10,000 programming
contest for COMPUTE!'s Atari ST Disk & Magazine. Laser Chess is a
two-player strategy game patterned after traditional chess--with
some fascinating new twists. The original version was written in
Modula-2 for the Atari ST. The PC version of Laser Chess was
written and compiled with Microsoft's QuickBASIC compiler. It
runs on any IBM PC, XT, AT, or compatible with a Color/Graphics
Adapter and a color monitor. The disk filename is LASER.EXE.
"Laser Chess," as the name implies, is a chess-like strategy
game for two players. The goal is to manipulate a laser-firing
piece and various reflective objects to eliminate your opponent's
king. As in traditional chess, there are many ways to accomplish
this.
There are eight basic types of pieces in Laser Chess, and
each has unique capabilities. Over time, you'll learn each
piece's advantages and limitations. Obviously, the more you play
Laser Chess, the more you'll understand the pieces in your
arsenal, which in turn will make you a better player.
A Geometric Army
When the game starts, you'll see the game pieces on the playing
board. Some sides of certain pieces are highlighted. This
indicates a reflective surface. When a laser beam strikes a
reflective surface, it bounces off without harming the piece. But
if a piece is hit by a laser on a nonreflective surface, it is
destroyed.
A piece can also be removed from the board if it is captured
by an opposing piece. This is similar to traditional chess; to
capture a piece, you simply move one of your own pieces onto its
square.
In addition to having the ability to move from square to
square, pieces with reflective surfaces can also be rotated in
place in 90-degree increments. This lets you orient the piece to
protect it against opposing laser shots or to set up bounce shots
with your own laser.
The king is the most important piece in Laser Chess. (The
king is the center piece in the back row.) When the king is
eliminated, the other player wins the game. Since it has no
reflective surfaces, the king can be destroyed by a laser from
any angle. It can also be captured by an opposing piece. The king
is not totally defenseless, however. It can capture any opposing
piece by moving onto its square. But you can use it for a capture
only once per turn.
The second most important piece is the laser. (The laser is
the gun-shaped piece next to the king.) This piece is your
primary offensive weapon; it's the only piece which can fire a
laser shot. To take aim, you can rotate it in place at 90-degree
angles. Like the king, the laser is completely vulnerable to
enemy laser strikes because it has no reflective surfaces. If you
lose your laser, the game is not over, but only the most skillful
(or incredibly lucky) player can overcome its loss.
Tricky Pieces
The hypercube, the box next to the king, is an interesting
piece. It can't harm an opposing piece directly, but may very well
do so indirectly. When the hypercube is moved onto another piece
(even your own), that piece disappears from its original position
and reappears on a randomly selected empty square. This can be done
only once per turn. Thus, the hypercube is a two-edged sword; it
may relocate a piece to a vulnerable position or make it possible
for the piece to capture an important opposing piece on the next
move.
The hypercube has no reflective surfaces and cannot be
rotated. It is invulnerable to laser shots, however, because it's
made of transparent glass--a laser beam passes right through it.
But the hypercube is vulnerable to capture by other pieces--even
your own. The hypercube relocates a piece only when it is moved
onto the other piece; moving a block or a king onto the hypercube
will eliminate it from the board. Remember that.
The beam splitter, the piece in front of the laser, is
another tricky piece. When a laser beam strikes a splitter's
vertex (the point opposite its base), the beam splits in half.
The two new beams travel in opposite directions, perpendicular to
the original beam's path. When a laser shot hits one of the beam
splitter's reflective surfaces, it bounces off at a 90-degree
angle without splitting. If the beam splitter's base is hit by a
laser shot, it is destroyed. The beam splitter can be rotated.
Blocks, the four solid boxes in the front row, are fairly
simple pieces. However, they may impose some complex situations.
A block can capture any opposing piece by moving onto that
piece's square, much like a king. But unlike a king, a block has
one reflective side and can be rotated as the situation demands.
Therefore, blocks can be used either offensively or defensively.
A laser beam that hits the reflective surface of a block is
deflected 180 degrees--bouncing the beam back where it came from.
A diagonal mirror cannot be destroyed by a laser because both
of its surfaces are reflective. There are two diagonal mirrors:
one next to the hypercube and one next to the laser. Diagonal
- 2 -
mirrors can be removed from the board only when captured by a
block or a king. When a laser beam strikes a diagonal mirror, the
beam is deflected 90 degrees. Diagonal mirrors can be flipped to
their opposite diagonal, but they cannot be rotated to face
horizontally or vertically.
The horizontal/vertical mirrors, known as straight mirrors,
are also invulnerable to lasers because of their reflective
surfaces. (There are two straight mirrors. One is located in
front of the hypercube. The other can be found in front of the
king.) When a laser hits a straight mirror on its flat surface,
the beam is deflected 180 degrees. If the laser hits a straight
mirror edgewise, the beam passes straight through it. A straight
mirror can be rotated so that it's either horizontal or vertical,
but not diagonal.
The triangular mirrors, which can be rotated in 90-degree
increments, deflect laser beams just as diagonal mirrors do, but
they are vulnerable to hits on their two nonreflective sides.
There are six triangular mirrors: four in the back row and two in
the front.
Making Moves
In a game of Laser Chess, players take turns making moves, just
as in regular chess. However, a turn in Laser Chess consists of
two moves. The color of the border (either cyan or magenta)
surrounding the playing board indicates whose turn it is and the
thickness of the border indicates how many moves remain in that
turn (a thick border indicates two moves; a thin border, one).
The magenta player (at the bottom of the screen) always gets
the first move. There's no particular advantage or disadvantage
to moving first.
All game functions are controlled with the keyboard. Before
moving or rotating a piece, you must select it. This is done by
moving a cursor to the piece's square. At the beginning of each
turn, the cursor is always positioned on the square at the very
center of the board. (This square is special for another reason,
too, which we'll explain in a moment.) You can move the cursor
anywhere on the playing board by pressing the usual cursor-arrow
keys. To select a piece, move the cursor to its square and press
Enter. When the piece is selected, a checkerboard pattern appears
around it.
If you accidentally select the wrong piece, you can deselect
it by pressing Enter again. (This won't cost you a move.)
Deselecting is usually done after rotating a piece. More on this
in a moment.
After you've selected a piece, your next decision is whether
to move or rotate it. To move a piece, simply position the cursor
on the destination square and press Enter. Moving a distance of
- 3 -
one square takes one move; moving two squares takes two moves.
(To save time, you can move a piece two squares in one step, but
it still counts as two moves.) Since you have only two moves per
turn, the maximum distance a piece can be moved in one turn is
two squares.
Pieces can be moved forward, backward, left, or right, but
not diagonally. Of course, you can effectively move a piece
diagonally by using two moves--forward and right, for instance.
You can even do this in a single action by simply positioning the
cursor on the adjacent diagonal square and pressing Enter; if
there's a clear path, the computer moves the piece to the square
and charges you two moves (one full turn).
You cannot move a piece through other pieces. The only
exceptions are captures with blocks and kings, and moves of the
hypercube as described above.
Rotating a Piece
To rotate a piece, select it and press the space bar. If it's
not legal to rotate that particular piece, the program won't let
you. Otherwise, the piece rotates 90 degrees (one-quarter turn)
clockwise. You may continue rotating the piece to any desired
position before deselecting it by pressing Enter again.
Rotating a piece to face any direction takes only one move,
and the move is subtracted only after the piece has been
deselected. If you deselect the piece in its original position,
the program recognizes this and does not subtract a move. This
lets you cancel a rotation if you change your mind.
Special Features
As mentioned above, the square at the very center of the board--
called a hypersquare--is special. It absorbs laser beams and
relocates any piece that moves onto it. The piece disappears from
its original position and reappears randomly on an empty square.
This may be done only once per turn, however.
Laser Chess has additional keyboard controls which are
available at any time between moves.
The S key turns the sound effects on or off. Normally
they're off. There aren't many sound effects in Laser Chess,
since it's mainly a thinking game, but you can turn them on if
you want.
The R key lets you restart a game without finishing the
current game. (For instance, a player may be so hopelessly behind
that he or she wants to resign.) The program asks you to confirm
this choice by pressing Y for yes or N for no.
- 4 -
The Q key lets you quit a game in progress and return to
DOS. Again, the program asks you to press Y or N for
confirmation.
Firing the Laser
To fire a laser shot, select your laser piece and press the L
key. The laser beam remains on the screen long enough for you to
observe its path (sometimes it bounces in directions you didn't
foresee).
Of course, you won't necessarily be firing the laser on every
turn. Much of the strategy in Laser Chess involves moving and
rotating your pieces to set up complex shots. It's important to
realize that any laser hit on a piece's nonreflective or
nontransparent surface will destroy that piece. You can destroy
your own pieces just as easily as you can destroy your
opponent's. You can even zap your own laser, particularly if you
fire directly into the 180-degree reflective surface of a
straight mirror or block, or if you fail to anticipate the
effects of a beam splitter. Be forewarned.
Laser Chess Strategy
As in the conventional game of chess, much of the strategy in
Laser Chess revolves around thoughtful placement of your pieces.
However, the character of the game differs from that of chess in
many ways. The laser, for example, can strike at long distances
and in more than one direction at once. And the hypercube adds an
extra element of uncertainty. The best strategy for any
particular game depends to a great extent on the skill and
personality of your opponent. However, here are some general tips
you may find helpful.
Get your mirrors out early. Use them to gain the fullest
potential of your laser. Try to position mirror networks on both
sides of the beam splitter so you can inflict as much damage as
possible.
Take advantage of the blocks. Since they "control" an area
around them with their threat of capture, no other pieces can
safely move within their range. Make your opponent work to
displace them. Remember to rotate the reflective side of a block
to the most probable direction of laser fire. If you can prevent
a laser from destroying the block, your opponent will most likely
have to gang up on it with two or more of his or her own blocks.
Use mirrors to protect your king. If you surround your king
with straight and diagonal mirrors, there is no way it can be hit
by a laser. Therefore, your opponent will have to break through
your defense with blocks. (This is a pretty dirty trick when all
of your opponent's blocks have been destroyed, since your king is
- 5 -
almost invulnerable.) Defending your king with blocks is also a
good strategy.
The hypercube should be used sparingly since you have no idea
where a relocated piece will reappear. Most players use the
hypercube as a last resort: If a piece is going to be destroyed
anyway, it doesn't hurt to take a chance and relocate it with the
hypercube. Also, if your opponent's king is encircled with
mirrors, you can march right in with your hypercube, followed by
a block. This tactic may displace your opponent's defense,
forcing your opponent to evacuate the king from its mirrored
fortress. Escorting the hypercube with an adjacent block prevents
the opponent from attacking the hypercube with his or her king.
Your opponent's only options will be to flee or be displaced.
- 6 -